﻿<%@ Page Title="" Language="C#" MasterPageFile="~/form/MasterPage.Master" AutoEventWireup="true" CodeBehind="Productos.aspx.cs" Inherits="web.form.Productos" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .style17
        {
            height: 26px;
            width: 322px;
        }
        .style18
        {
            width: 322px;
        }
        .style23
        {
            height: 26px;
            width: 453px;
        }
        .style24
        {
            width: 453px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:Panel ID="pnlEncabezado" runat="server">
    <br/>
    <h1>Producto</h1>
    <hr />
    <br/>
    </asp:Panel>
    <asp:Panel ID="pnlGrilla" runat="server">
        Codigo
        <asp:TextBox ID="txt_filtro" runat="server" CssClass="text" Width="129px"></asp:TextBox>
        <asp:Button ID="cmd_filtrar" runat="server" CssClass="boton" 
            onclick="cmd_filtrar_Click" Text="Filtrar" />
        <br />
        <br />
        <asp:GridView ID="grdProductos" runat="server" CellPadding="4" 
                        EnablePersistedSelection="True" ForeColor="#333333" 
            GridLines="None" AutoGenerateSelectButton="True" AllowPaging="True" 
            onpageindexchanging="grdProductos_PageIndexChanging">
            <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
            <EditRowStyle BackColor="#999999" />
            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#78bbe6" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#78bbe6" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
            <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#E9E7E2" />
            <SortedAscendingHeaderStyle BackColor="#506C8C" />
            <SortedDescendingCellStyle BackColor="#FFFDF8" />
            <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
        </asp:GridView>
        <br />
        <asp:CheckBox ID="chk_CampoBaja" runat="server" AutoPostBack="True" 
            Text="Mostrar dados de Baja" 
            oncheckedchanged="chk_CampoBaja_CheckedChanged1" />
        <br />
        <br />
        <asp:Button ID="cmd_agregar" runat="server" Text="Agregar" 
            onclick="cmd_agregar_Click" Width="80px" class="boton" />
        <asp:Button ID="cmd_editar" runat="server" Text="Editar" Width="80px" 
            class="boton" onclick="cmd_editar_Click" />
        <asp:Button ID="cmd_ver" runat="server" Text="Ver" Width="80px" class="boton" 
            onclick="cmd_ver_Click" />
        <asp:Button ID="cmd_eliminar" runat="server" Text="Eliminar" Width="80px" 
            class= "boton" OnClientClick="return confirm('¿Está seguro que desea eliminar el producto seleccionado?');" onclick="cmd_eliminar_Click"/>
    </asp:Panel>
    <asp:Panel ID="pnlFormulario" runat="server">

        <asp:HiddenField ID="hEstado" runat="server" />
        <table>
        <tr>
            <td class="style17">
                Id</td>
            <td class="style23">
                &nbsp;</td>
        </tr>
            <tr>
                <td class="style17">
                    <asp:TextBox ID="txtIdProducto" runat="server" CssClass="text" Enabled="False" 
                        Width="300px"></asp:TextBox>
                </td>
                <td class="style23">
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style17">
                    Código&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                </td>
                <td class="style23">
                    &nbsp;</td>
            </tr>
        <tr>
            <td class="style18">
    <asp:TextBox ID="txtNombre" runat="server" Width="300px" Class="text-combo" 
                    CssClass="text" MaxLength="50"></asp:TextBox>

            </td>
            <td class="style24">
                <asp:RequiredFieldValidator ID="RequiredFieldValidator10" runat="server" 
                    ControlToValidate="txtNombre" ErrorMessage="*Campo requerido" 
                    Display="Dynamic"></asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                    ControlToValidate="txtNombre" ErrorMessage="*El codigo no tiene formato válido" 
                    ValidationExpression="(?:[A-Za-z]+-\d+)" Display="Dynamic"></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td class="style18">
                Proveedor&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
                </td>
            <td class="style24">
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style18">
                <asp:DropDownList ID="cmbProveedor" runat="server" Width="310px" 
                    Class="text-combo" CssClass="combo">
                </asp:DropDownList>
            </td>
            <td class="style24">
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                    ControlToValidate="cmbProveedor" ErrorMessage="*Campo requerido" 
                    Display="Dynamic"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="style18">
                Tipo de producto&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                </td>
            <td class="style24">
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style18">
                <asp:RadioButtonList ID="rbl_tipoProd" runat="server" Width="300px">
                    <asp:ListItem Value="ROPA">Ropa</asp:ListItem>
                    <asp:ListItem Value="ACCESORIO">Accesorio</asp:ListItem>
                </asp:RadioButtonList>
            </td>
            <td class="style24">
                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                    ControlToValidate="rbl_tipoProd" ErrorMessage="*Campo requerido" 
                    Display="Dynamic"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td class="style18">
                Tela&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                </td>
            <td class="style24">
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style18">
                <asp:DropDownList ID="cmbTela" runat="server" Width="310px" Class="text-combo" 
                    CssClass="combo">
                </asp:DropDownList>
            </td>
            <td class="style24">
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style18">
                Stock Minimo</td>
            <td class="style24">
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style18">
                <asp:TextBox ID="txtStockMinimo" runat="server" Width="300px" 
                    Class="text-combo" CssClass="text" MaxLength="20"></asp:TextBox>
            </td>
            <td class="style24">
                <asp:CompareValidator ID="CompareValidator4" runat="server" 
                    ControlToValidate="txtStockMinimo" 
                    ErrorMessage="*El valor ingresado debe ser un número" Type="Double" 
                    Display="Dynamic"></asp:CompareValidator>
            </td>
        </tr>
            <tr>
                <td class="style17">
                    Stock&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    </td>
                <td class="style23">
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style18">
                    <asp:TextBox ID="txtStock" runat="server" Width="300px" Class="text-combo" 
                        CssClass="text" MaxLength="20"></asp:TextBox>
                </td>
                <td class="style24">
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" 
                        ControlToValidate="txtStock" ErrorMessage="*Campo requerido" 
                        Display="Dynamic"></asp:RequiredFieldValidator>
                    <asp:CompareValidator ID="CompareValidator1" runat="server" 
                        ControlToValidate="txtStock" 
                        ErrorMessage="*El valor ingresado debe ser un número" Type="Double" 
                        Display="Dynamic"></asp:CompareValidator>
                </td>
            </tr>
            <tr>
                <td class="style18">
                    Descripción&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    </td>
                <td class="style24">
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style18">
                    <asp:TextBox ID="txtDescripcion" runat="server" Width="300px" 
                        Class="text-combo" CssClass="text" MaxLength="200"></asp:TextBox>
                </td>
                <td class="style24">
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" 
                        ControlToValidate="txtDescripcion" ErrorMessage="*Campo requerido" 
                        Display="Dynamic"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td class="style18">
                    Precio Venta&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    </td>
                <td class="style24">
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style18">
                    <asp:TextBox ID="txtPrecioVenta" runat="server" Width="300px" 
                        Class="text-combo" CssClass="text" MaxLength="20"></asp:TextBox>
                </td>
                <td class="style24">
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" 
                        ControlToValidate="txtPrecioVenta" ErrorMessage="*Campo requerido" 
                        Display="Dynamic"></asp:RequiredFieldValidator>
                    <asp:RangeValidator ID="RangeValidator1" runat="server" 
                        ControlToValidate="txtPrecioVenta" ErrorMessage="*Precio no válido" 
                        MaximumValue="8000" MinimumValue="0" Display="Dynamic"></asp:RangeValidator>
                    <asp:CompareValidator ID="CompareValidator2" runat="server" 
                        ControlToValidate="txtPrecioVenta" 
                        ErrorMessage="*El valor ingresado debe ser un número" Type="Double" 
                        Display="Dynamic"></asp:CompareValidator>
                </td>
            </tr>
            <tr>
                <td class="style18">
                    Precio Compra&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    </td>
                <td class="style24">
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style18">
                    <asp:TextBox ID="txtPrecioCompra" runat="server" Width="300px" 
                        Class="text-combo" CssClass="text" MaxLength="20"></asp:TextBox>
                </td>
                <td class="style24">
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" 
                        ControlToValidate="txtPrecioCompra" ErrorMessage="*Campo requerido" 
                        Display="Dynamic"></asp:RequiredFieldValidator>
                    <asp:RangeValidator ID="RangeValidator3" runat="server" 
                        ControlToValidate="txtPrecioCompra" ErrorMessage="*Precio no válido" 
                        MaximumValue="8000" MinimumValue="0" Display="Dynamic"></asp:RangeValidator>
                    <asp:CompareValidator ID="CompareValidator3" runat="server" 
                        ControlToValidate="txtPrecioCompra" 
                        ErrorMessage="*El valor ingresado debe ser un número" Type="Double" 
                        Display="Dynamic"></asp:CompareValidator>
                </td>
            </tr>
            <tr>
                <td class="style18">
                    Fecha Alta&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    </td>
                <td class="style24">
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style18">
                    <asp:TextBox ID="txtFechaAlta" runat="server" Width="300px" Class="text-combo" 
                        CssClass="text" MaxLength="10"></asp:TextBox>
                </td>
                <td class="style24">
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server" 
                        ControlToValidate="txtFechaAlta" ErrorMessage="*Campo requerido" 
                        Display="Dynamic"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td class="style18">
                    &nbsp;</td>
                <td class="style24">
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style18">
                    <asp:Button ID="cmd_Guardar" runat="server" Text="Guardar" 
                        onclick="cmd_Guardar_Click"  class="boton"/>
                    <asp:Button ID="cmd_cancelar" runat="server" Text="Cancelar" 
                        onclick="cmd_cancelar_Click" CausesValidation="False" class="boton" />
                    <asp:Button ID="cmd_ConfirmEliminar" runat="server" CssClass="boton" 
                        onclick="cmd_ConfirmEliminar_Click" Text="Eliminar" Visible="False" 
                        CausesValidation="False" />
                </td>
                <td class="style24">
                    &nbsp;</td>
            </tr>
    </table>

        <br />

    </asp:Panel>
</asp:Content>
